/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package edu.ccut.titan.component;

/**
 * Record a parameter information in the titan-composite.xml, *.action.xml or
 * *.logic.xml file.
 * 
 * <p>
 * Parameter has four scope:
 * <li>1. SCOPE_APPLICATOIN : globe parameter
 * <li>2. SCOPE_SESSION : in a session parameter
 * <li>3. SCOPE_REQUEST: in a request parameter
 * <li>4. SCOPE_LOGIC: in a logic or action process parameter
 * 
 * <p>
 * Parameter has three passing type:
 * <li>1. TYPE_IN : input parameter
 * <li>2. TYPE_OUT : output parameter
 * <li>3. TYPE_IN_OUT : input and output parameter
 * 
 * @author LeslieGu
 */
public interface IParameterInfo extends Comparable<IParameterInfo> {

	public static final int SCOPE_APPLICATOIN = 10;

	public static final int SCOPE_SESSION = 5;

	public static final int SCOPE_REQUEST = 2;

	public static final int SCOPE_LOGIC = 1;

	public static final String PASSING_IN = "in";

	public static final String PASSING_OUT = "out";

	public static final String PASSING_IN_OUT = "in-out";

	public static final String PASSING_UNDEFINE = "undefine";

	/**
	 * Get parameter id, use to sort
	 * 
	 * @return
	 */
	public String getId();

	/**
	 * Get parameter name
	 * 
	 * @return
	 */
	public String getName();

	/**
	 * Get parameter value class type
	 * 
	 * @return
	 */
	public Class<?> getClassType();

	/**
	 * Get parameter passing type
	 * 
	 * @return
	 */
	public String getPassingType();

	/**
	 * Get parameter description
	 * 
	 * @return
	 */
	public String getDescription();

	/**
	 * Get parameter value key
	 * 
	 * @return
	 */
	public String getValueKey();

	/**
	 * Get parameter scope
	 * 
	 * @return
	 */
	public int getScope();
}
